package com.muatocroi.tornado;

public class CommandMouse extends CommandSignal {

	public CommandMouse() {
		cmdCode = 100;
	}

	public static CommandMouse Move(short dx, short dy) {
		CommandMouse c = new CommandMouse();
		c.exCode = 0;
		c.arg = dy;
		c.arg = c.arg << 16;
		c.arg += dx;
		return c;
	}

	public static CommandMouse LeftDown() {
		CommandMouse c = new CommandMouse();
		c.exCode = 1;
		return c;
	}

	public static CommandMouse LeftUp() {
		CommandMouse c = new CommandMouse();
		c.exCode = 2;
		return c;
	}

	public static CommandMouse LeftClick() {
		CommandMouse c = new CommandMouse();
		c.exCode = 3;
		return c;
	}

	public static CommandMouse LeftDoubleClick() {
		CommandMouse c = new CommandMouse();
		c.exCode = 4;
		return c;
	}

	public static CommandMouse RightDown() {
		CommandMouse c = new CommandMouse();
		c.exCode = 5;
		return c;
	}

	public static CommandMouse RightUp() {
		CommandMouse c = new CommandMouse();
		c.exCode = 6;
		return c;
	}

	public static CommandMouse RightClick() {
		CommandMouse c = new CommandMouse();
		c.exCode = 7;
		return c;
	}

	public static CommandMouse RightDoubleClick() {
		CommandMouse c = new CommandMouse();
		c.exCode = 8;
		return c;
	}

	public static CommandMouse VScroll(byte line) {
		CommandMouse c = new CommandMouse();
		c.exCode = 9;
		c.arg = line;
		return c;
	}

	public static CommandMouse HScroll(byte line) {
		CommandMouse c = new CommandMouse();
		c.exCode = 10;
		c.arg = line;
		return c;
	}
}
